import * as React from 'react';
import * as ReactDOM from 'react-dom';
import {setupLanguage} from "./CCML/setup";
import { Editor } from './Editor';
import { languageID } from './CCML/config';
import MEditor from './MEditor';

setupLanguage();//注册语法解析服务
var codestring:string;
function update_code(code:string):void{
    codestring = code;
}

const App = () => <Editor language={languageID} update_func={update_code} ></Editor>;

//ReactDOM.render(<App/>, document.getElementById('container'));
ReactDOM.render(<MEditor/>, document.getElementById('editor_test'));